﻿using System;
using System.Net;

namespace RakutenProxy.DataConverter.Helper
{
    public class ImageDownloader
    {
        public static byte[] Download(string imageUrl)
        {
            if (string.IsNullOrEmpty(imageUrl))
                return null;
            byte[] data = null;
            try
            {
                using (var client = new WebClient())
                {
                    data = client.DownloadData(imageUrl);
                }
            }
            catch { }

            return data;
        }
    }
}